-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repair environment on load #86
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
weshinsley
approved these changes
Oct 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked through - all good - one more ANSI-related change below for a local test failure for me (wonder why it doesn't fail on CI) - and removing the unnecessary (.+) from my earlier hack
Co-authored-by: Wes Hinsley <w.hinsley@imperial.ac.uk>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is something we fought against a bit in dust1/mcstate1, because when using callr we won't find code that we've loaded using
pkgload::load_all
. This PR adds a slightly different bit of R code into the template for throwaway packages (created bydust_compile
) compared with the more permanent ones created bydust_compile
. This means that if a user has donedust_compile()
on a model and fed that into the callr runner for monty we will load the package namespace and everything should proceed fairly happily.This is not a big problem for code where we have created a package, installed it and run monty from there. We don't really solve this for the case where the user is developing a package and trying to use the callr runner; there we'll need them to install that package for callr to work
Closes #92 - contains the same commit 6206dc3 and then we also have the fix for our new template here too